<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>2018/12/6</title>
    <script src="node_modules/_vue@2.5.17@vue/dist/vue.min.js"></script>
    <script src="node_modules/Mock/dist/mock-min.js"></script>
    <link rel="stylesheet" href="./index2.css">
    <!--好的代码像粥一样,是得用时间和精力熬的。-->
</head>
<body>
<div id="root" v-cloak>
    <app-list :foo="index"></app-list>
    <app-footer @index="fn"></app-footer>
</div>
</body>
<script type="x-template" id="app-list">
    <ul v-show='!!userData.length' class="user-list">
        <li class="user-item">
            <span>姓名</span>
            <span>性别</span>
            <span>年龄</span>
            <span>电话</span>
            <span>操作</span>
        </li>
            <li v-for="(item,index) in filterUser" class="user-item">
                <span>{{item.name}}</span>
                <span>{{item.gender|toGender}}</span>
                <span>{{item.age}}</span>
                <span>{{item.phoneNumber}}</span>
                <span @click ="clickToDel(index)">删除</span>
            </li>
    </ul>
</script>
<script src="app-list.js"></script>
<script type="x-template" id="app-footer">
    <ul class="ft-bar">
        <li v-for="(item,key) in ftBar" @click="select(key)" :class="{active: key === selectedKey}">{{item}}</li>
    </ul>
</script>
<script src="app-footer.js"></script>
<script src="app1.js"></script>
</html>
